package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.pojo.entity.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * 收货地址 mapper 层
 */
@Mapper
public interface AddressMapper extends BaseMapper<Address> {

    /**
     * 分页查询收货地址
     *
     * @param pageObject MybatisPlus 分页对象
     * @param address 条件
     * @return 分页结果
     */
    IPage<Address> pageQuery(@Param("page") IPage<Address> pageObject, @Param("address") Address address);

    /**
     * 根据条件查询全部收货地址
     *
     * @param address 条件
     * @return 收货地址列表
     */
    List<Address> query(@Param("address") Address address);
}
